package com.aaa.controller;

import com.aaa.entity.Customer;
import com.aaa.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName CustomerController
 * @Description TODO
 * @Author LP
 * @Date 2018/12/15 14:02
 * @Version 1.0
 **/
@Controller
@RequestMapping("/cstm")
public class CustomerController extends BaseController{
    @Autowired
    private ICustomerService customerService;

    @RequestMapping("/jump")
    public String customer() {
        return "customerInfo";
    }
    @RequestMapping("/listCustomer")
    @ResponseBody
    public List<Customer> listCustomer(){//@RequestBody Map<String,Object> query
            Map<String, Object> query=new HashMap<>();
            return customerService.listCustomer(query);
    }
}
